package com.food.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.food.pojo.Comments;

import java.util.List;


public interface CommentsService extends IService<Comments> {
    /**
     * 根据美食id查询相应的评论信息
     * @param foodsId
     * @return
     */
    List<Comments> selectFoodsId(Integer foodsId);

    /**
     * 查询前三条评论
     */
    List<Comments> selectLimit3();

    /**
     * 查询个人评论
     * @return
     */
    List<Comments> selectLimitAll(Integer userId);

    /**
     * 插入一条评论
     */
    int insertCommentByCommentRecord(Comments comments);
}
